<template>
    <input type="text" v-model="username" placeholder="请输入用户名">
    <input type="password" v-model="password" placeholder="请输入密码">
    <button @click="submitInfo">登录</button>
</template>
<script setup>
    import {useRoute,useRouter} from 'vue-router'
    import {ref} from 'vue'
    const route = useRoute()
    const router = useRouter()
    const username = ref('')
    const password = ref('')
    const submitInfo = ()=>{
        if(username.value=='李明'&&password.value=='123456'){
            alert("登录成功");
            router.push('./center')
        }else{
            alert("登录失败")
        }
    }
</script>